/*
 * sm5602_battery_table.h
 *
 * Copyright (C) 2021 SiliconMitus
 *
 */

#include "sm5602_fg.h"
static struct sm5602_fg_batt_type_data sm5602_batt_type = {
	//1st battery
    .type[0] = {
        .batt_id = 0,
		.en_temp_ex = 1,
		.en_temp_in = 0,
	//	.en_temp_3rd = 0,
		.en_batt_det = 0,
		.iocv_man_mode = 1,
	//	.misc = 0x0800,
		.aging_ctrl = 0x0121,
		.batt_rsns = 0,
        .cycle_cfg = 0x7000,
		.fg_irq_set = 0x07FF,
		.low_soc1 = 1,
		.low_soc2 = 15,
		.v_l_alarm = 3400,
		.v_h_alarm = 4400,
        .battery_table_num = 1,
        .misc = 0x800,
       // .batt_v_max = 4450,
        //.min_cap = 0,
		.common_param_version = 2,
		.t_l_alarm_in = 49,
		.t_h_alarm_in = 1,
		.t_l_alarm_ex = 0xE8E0,
		.t_h_alarm_ex = 0x9E2B,
    	
		.battery_param_version = 3,			
        .battery_type = {4400, 0x0, 0x262A},
    	.battery_table[0] = {0x1400, 0x1B52, 0x1C0A, 0x1C94, 0x1CFB, 0x1D69, 0x1D80, 0x1D89, 0x1D8C, 0x1DDF, 0x1E08, 0x1E4A, 0x1E77, 0x1ECD, 0x1F31, 0x1FB4, 0x1FF7, 0x2079, 0x20D1, 0x2178, 0x224C, 0x22AB, 0x22F3, 0x2400},
    	.battery_table[1] = {0x0, 0x80, 0x180, 0x280, 0x399, 0x519, 0x699, 0x919, 0xAB3, 0x11CC, 0x16CC, 0x1E80, 0x2619, 0x3033, 0x37CC, 0x3CE6, 0x4200, 0x4719, 0x4C19, 0x53CC, 0x5CE6, 0x6100, 0x6400, 0x664C},
		.battery_table[2] = {0x1A20, 0x1517, 0x1314, 0x1112, 0x1010, 0x0F0F, 0x0E0E, 0x0D0D},
		.alpha = 0x00CC,
		.beta = 0x0025,					
		.rs = 0x005F,						
		.rs_value = {0x0050, 0x010A, 0x3800, 0x0048}, 
		.vit_period = 0x315A,			
		.volt_cal = 0x8000,						
		.mix_value = 0x0003, 						
		.curr_offset = 0x0000, 					
		.curr_slope = 0x8080,					
		.topoff_soc = {7, 600, 100},										
        .batery_thermal_table = {0x435B, 0x3E57, 0x3963, 0x3486, 0x2FC5, 0x2B1B, 0x2688, 0x2200, 0x1DA3, 0x1932,
									0x1534, 0x1148, 0x0D46, 0x096E, 0x05A0, 0x01F4, 0xF62D, 0xF2BC, 0xEF68, 0xEC08,
									0xE8E0, 0xE5D2, 0xE2DC, 0xDFFC, 0xDD33, 0xDA83, 0xD7E5, 0xD55E, 0xD2EF, 0xD092,
									0xCE4A, 0xCC12, 0xC9EF, 0xC7E3, 0xC5E4, 0xC3F8, 0xC21D, 0xC051, 0xBE97, 0xBCE9,
									0xBB4D, 0xB9C2, 0xB840, 0xB6CF, 0xB569, 0xB40F, 0xB2C2, 0xB17F, 0xB049, 0xAF1E,
									0xADFD, 0xACE4, 0xABD7, 0xAAD5, 0xA9DD, 0xA8EB, 0xA805, 0xA71E, 0xA648, 0xA577,
									0xA4B0, 0xA3ED, 0xA32F, 0xA27D, 0xA1CE, 0xA124, 0xA082, 0x9FE7, 0x9F50, 0x9EBC,
									0x9E2B, 0x9DA3, 0x9D20, 0x9CA1, 0x9C27, 0x9BAF, 0x9B3B, 0x9ACC, 0x9A62, 0x99FA,
									0x9996, 0x9938, 0x98DE, 0x9885, 0x982E, 0x97DA, 0x978A, 0x973D, 0x96F2, 0x96AA,
									0x9665, 0x9621, 0x95DF, 0x959F, 0x9561, 0x9525, 0x94EB, 0x94B3, 0x947C, 0x9447,
									0x9414},			//NTC 10K/ PU 100k table -20~80 	
	    },
};
